
local case =env:getHeader("Hangup-Cause");

if(case =="NORMAL_CLEARING")then --可能是正常挂断的，默认值是这个
	freeswitch.consoleLog("INFO","正常挂断")
	return "break";
end



local event = freeswitch.Event("CUSTOM", "NECO:CALLOUT_NOANSWER");
event:addHeader("Caller-Orig-Caller-ID-Number",env:getHeader("Caller-Username"));
event:addHeader("Caller-Callee-ID-Number",env:getHeader("Caller-Callee-ID-Number"));
event:addHeader("Unique-ID",env:getHeader("call_uuid"));
event:addHeader("Case",case);
event:fire();
freeswitch.consoleLog("INFO","挂断"..case)
